package com.orangesoft.tescherfriend.business.user.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.orangesoft.tescherfriend.business.user.entity.User;

import java.util.List;

/**
*
*用户
*
*@author xhy
**/
@Repository
public interface UserDao extends JpaRepository<User, Long>, UserDaoCustom {

    /**
     * 根据登录userCode和密码查询出唯一的登录人信息
     *
     * @param userCode
     * @return
     */
    @Query("select s from User s where s.userCode =:userCode")
    List<User> findByUserCode(@Param("userCode") String userCode);
}
